<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>T3D: T3D::Plane Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">T3D
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>T3D</b></li><li class="navelem"><a class="el" href="class_t3_d_1_1_plane.html">Plane</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="class_t3_d_1_1_plane-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">T3D::Plane Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a7b88c865ee7fcf448f7a070e1c41fd8f"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a7b88c865ee7fcf448f7a070e1c41fd8f">Side</a> { <b>NO_SIDE</b>, 
<b>POSITIVE_SIDE</b>, 
<b>NEGATIVE_SIDE</b>, 
<b>BOTH_SIDE</b>
 }</td></tr>
<tr class="separator:a7b88c865ee7fcf448f7a070e1c41fd8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8be72fde9705d3f895e9ca94142d95ae"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a8be72fde9705d3f895e9ca94142d95ae">Plane</a> ()</td></tr>
<tr class="separator:a8be72fde9705d3f895e9ca94142d95ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93f95613f4355aba04087ba41f07dc6d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a93f95613f4355aba04087ba41f07dc6d"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Plane</b> (const <a class="el" href="class_t3_d_1_1_plane.html">Plane</a> &amp;other)</td></tr>
<tr class="separator:a93f95613f4355aba04087ba41f07dc6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ebfff7c0e66027425d035230fd5bbd6"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a2ebfff7c0e66027425d035230fd5bbd6">Plane</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;normal, float dist)</td></tr>
<tr class="separator:a2ebfff7c0e66027425d035230fd5bbd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5b97d4f7eb4b8db01904b4532ae082d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#ab5b97d4f7eb4b8db01904b4532ae082d">Plane</a> (float a, float b, float c, float d)</td></tr>
<tr class="separator:ab5b97d4f7eb4b8db01904b4532ae082d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a327651b2277b69f1ff1f0cf7595c5bcc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a327651b2277b69f1ff1f0cf7595c5bcc"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Plane</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;normal, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;point)</td></tr>
<tr class="separator:a327651b2277b69f1ff1f0cf7595c5bcc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e079a453f9c58bd9d70878c74efb9e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0e079a453f9c58bd9d70878c74efb9e2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>Plane</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;p0, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;p1, const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;p2)</td></tr>
<tr class="separator:a0e079a453f9c58bd9d70878c74efb9e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc0d5ce451d693a9031bf3081dbb98f9"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adc0d5ce451d693a9031bf3081dbb98f9"></a>
<a class="el" href="class_t3_d_1_1_plane.html#a7b88c865ee7fcf448f7a070e1c41fd8f">Side</a>&#160;</td><td class="memItemRight" valign="bottom"><b>getSide</b> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;p) const </td></tr>
<tr class="separator:adc0d5ce451d693a9031bf3081dbb98f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53d62abf549b68b0db8bb33fb8223bbc"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a53d62abf549b68b0db8bb33fb8223bbc">getDistance</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;p) const </td></tr>
<tr class="separator:a53d62abf549b68b0db8bb33fb8223bbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b438dca92bc3f1a3d3b4fa20fa30aaa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a0b438dca92bc3f1a3d3b4fa20fa30aaa">projectVector</a> (const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;v) const </td></tr>
<tr class="separator:a0b438dca92bc3f1a3d3b4fa20fa30aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a011283f711ddee11751b4ce298730895"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a011283f711ddee11751b4ce298730895">normalise</a> (void)</td></tr>
<tr class="separator:a011283f711ddee11751b4ce298730895"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6393acc636a4354cf8119ef0ec6c589a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6393acc636a4354cf8119ef0ec6c589a"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_t3_d_1_1_plane.html#a6393acc636a4354cf8119ef0ec6c589a">operator==</a> (const <a class="el" href="class_t3_d_1_1_plane.html">Plane</a> &amp;other) const </td></tr>
<tr class="memdesc:a6393acc636a4354cf8119ef0ec6c589a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Comparison operator. <br/></td></tr>
<tr class="separator:a6393acc636a4354cf8119ef0ec6c589a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ebafd275ef3af07319c4b0c1cd341b6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ebafd275ef3af07319c4b0c1cd341b6"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>operator!=</b> (const <a class="el" href="class_t3_d_1_1_plane.html">Plane</a> &amp;other) const </td></tr>
<tr class="separator:a0ebafd275ef3af07319c4b0c1cd341b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a7eb70178689e9defba32350887e0ad0c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7eb70178689e9defba32350887e0ad0c"></a>
<a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a>&#160;</td><td class="memItemRight" valign="bottom"><b>normal</b></td></tr>
<tr class="separator:a7eb70178689e9defba32350887e0ad0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae11f88e7de1d2ec10d9f6ec475c5cf60"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae11f88e7de1d2ec10d9f6ec475c5cf60"></a>
float&#160;</td><td class="memItemRight" valign="bottom"><b>d</b></td></tr>
<tr class="separator:ae11f88e7de1d2ec10d9f6ec475c5cf60"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:adf27382ee6307af9de5bea3e1ebee6e2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf27382ee6307af9de5bea3e1ebee6e2"></a>
std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>operator&lt;&lt;</b> (std::ostream &amp;o, const <a class="el" href="class_t3_d_1_1_plane.html">Plane</a> &amp;p)</td></tr>
<tr class="separator:adf27382ee6307af9de5bea3e1ebee6e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="a7b88c865ee7fcf448f7a070e1c41fd8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="class_t3_d_1_1_plane.html#a7b88c865ee7fcf448f7a070e1c41fd8f">T3D::Plane::Side</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The "positive side" of the plane is the half space to which the plane normal points. The "negative side" is the other half space. The flag "no side" indicates the plane itself. </p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8be72fde9705d3f895e9ca94142d95ae"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Plane::Plane </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor - sets everything to 0. </p>

</div>
</div>
<a class="anchor" id="a2ebfff7c0e66027425d035230fd5bbd6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Plane::Plane </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>normal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>dist</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Construct a plane through a normal, and a distance to move the plane along the normal. </p>

</div>
</div>
<a class="anchor" id="ab5b97d4f7eb4b8db01904b4532ae082d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">T3D::Plane::Plane </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>d</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Construct a plane using the 4 constants directly </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a53d62abf549b68b0db8bb33fb8223bbc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float T3D::Plane::getDistance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is a pseudodistance. The sign of the return value is positive if the point is on the positive side of the plane, negative if the point is on the negative side, and zero if the point is on the plane. </p>
<dl class="section user"><dt></dt><dd>The absolute value of the return value is the true distance only when the plane normal is a unit length vector. </dd></dl>

</div>
</div>
<a class="anchor" id="a011283f711ddee11751b4ce298730895"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void T3D::Plane::normalise </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Normalises the plane. </p>
<dl class="section remark"><dt>Remarks</dt><dd>This method normalises the plane's normal and the length scale of d is as well. </dd></dl>
<dl class="section note"><dt>Note</dt><dd>This function will not crash for zero-sized vectors, but there will be no changes made to their components. </dd></dl>

</div>
</div>
<a class="anchor" id="a0b438dca92bc3f1a3d3b4fa20fa30aaa"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> T3D::Plane::projectVector </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_t3_d_1_1_vector3.html">Vector3</a> &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<pre class="fragment">Project a vector onto the plane. 
</pre> <dl class="section remark"><dt>Remarks</dt><dd>This gives you the element of the input vector that is perpendicular to the normal of the plane. You can get the element which is parallel to the normal of the plane by subtracting the result of this method from the original vector, since parallel + perpendicular = original. </dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">v</td><td>The input vector </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>M:/T3Dwin/T3DShaderVersion/T3D/T3D/<a class="el" href="_plane_8h_source.html">Plane.h</a></li>
<li>M:/T3Dwin/T3DShaderVersion/T3D/T3D/Plane.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 27 2014 10:39:52 for T3D by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
